document.addEventListener('click', ({ target }) => {
    if (target.matches('legend'))
        target.parentElement.classList.toggle('contract')
})

// 更改为指向Flask路由的URL
fetch('/api', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        'Authorization': 'Bearer hjj'
    },
    body: JSON.stringify(data)
})
